<template>
    <NavHeader title="支付宝">
         <template v-slot:tip>
        <span>请尽快支付</span>
      </template>
    </NavHeader>
</template>
<script>
import NavHeader from './../../components/NavHeader_s'
import request from './../../request'
export default {
    name: 'alipay',
    components: {
        NavHeader,
    },
    mounted() {
        request.post('/order/pay', { orderNo: this.$route.query.orderNo, payType: '1' })
            .then(({ data: { returnUrl } }) => {
                if (returnUrl) {
                    location.href = returnUrl;
                    return;
                }
                
                this.$message.error('returnUrl不存在')            
            })
    }
}
</script>